Skip to content

Handle multiple and expanded sources properly#5

Open
smcgivern wants to merge 1 commit into
jdavis:masterfrom
smcgivern:support_src_arrays
Open

Handle multiple and expanded sources properly#5
smcgivern wants to merge 1 commit into
jdavis:masterfrom
smcgivern:support_src_arrays

Conversation

@smcgivern
Copy link
Copy Markdown

done should only be called once, but was called multiple times if either:

  • The src option was set to an array of files.
  • The expand option was enabled and that expanded to more than one file.

This would break future async grunt tasks. The destination would also be set to the same filename for all elements in src arrays, which is fixed in this branch too.

`done` should only be called once, but was called multiple times if
either:
- The `src` option was set to an array of files.
- The `expand` option was enabled and that expanded to more than one
file.
@csnover
Copy link
Copy Markdown

csnover commented Feb 11, 2015

@jdavis could you please either land this and publish a new version or mark this project as dead and not to be used? Introducing the grunt-rename task into a project breaks the build because of this issue.

@jdavis
Copy link
Copy Markdown
Owner

jdavis commented Feb 12, 2015

I don't use Node much anymore; I'll probably just deprecate this as I'm spread too thin.

@smcgivern
Copy link
Copy Markdown
Author

Please do; it's not your fault, but Grunt's async API is a) kind of insane (it shouldn't be so easy to break other tasks) and b) hard to debug.

@csnover if you really want this plugin, you can use my branch in your package.json. We are using it for production builds and it works for us 😃

"grunt-rename": "git://github.com/smcgivern/grunt-rename.git#support_src_arrays"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants